From: Keir Fraser Date: Mon, 22 Feb 2010 10:04:22 +0000 (+0000) Subject: hvmloader: fix vgatype detecting issue X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12582 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=b0e6d9b53ad560c76de274ff5cb91dacac327012;p=xen.git hvmloader: fix vgatype detecting issue When graphics card is assigned to a guest as a secondary VGA, without gfx_passthru and emulated VGA is the primary VGA, hvmloader misreads gfx_passthru is specified if VGA device is found after the emulated VGA. This patch fix this issue. If emulated VGA is found, hvmloader preserves it and loads vgabios of the emulated VGA. Signed-off-by: Noboru Iwamatsu --- diff --git a/tools/firmware/hvmloader/hvmloader.c b/tools/firmware/hvmloader/hvmloader.c index 6574a9baae..be0c3ffb98 100644 --- a/tools/firmware/hvmloader/hvmloader.c +++ b/tools/firmware/hvmloader/hvmloader.c @@ -210,11 +210,12 @@ static void pci_setup(void) switch ( class ) { case 0x0300: + /* If emulated VGA is found, preserve it as primary VGA. */ if ( (vendor_id == 0x1234) && (device_id == 0x1111) ) virtual_vga = VGA_std; else if ( (vendor_id == 0x1013) && (device_id == 0xb8) ) virtual_vga = VGA_cirrus; - else + else if ( virtual_vga == VGA_none ) virtual_vga = VGA_pt; break; case 0x0680: